package com.xbongbong.saas.enums;

import com.xbongbong.i18n.util.I18nMessageUtil;

/**
 * @author: wufeng
 * @date: 2018/11/27 19:40
 * @desrcption: 会签/或签
 */
public enum SignTypeEnum {

    //countersign
    ORSIGN(1, "enum.signType.memo.orsign"),
    COUNTERSIGN(2, "enum.signType.memo.countersign"),
    MULTI_CC(3,"enum.signType.memo.multiCC");

    private Integer value;

    private String memo;

    SignTypeEnum(Integer value ,String memo){
        this.value =value;
        this.memo = memo;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getMemo() {
        return I18nMessageUtil.getMessage(memo);
    }

    public void setMemo(String memo) {
        this.memo = memo;
    }

    public static String getSignTypeEnum(Integer value){
        for (SignTypeEnum signTypeEnum: values()){
            if(signTypeEnum.getValue().equals(value)) {
                return signTypeEnum.getMemo();
            }
        }
        return "";
    }
}
